#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File    :   manage.py
@Time    :   2020/09/22 14:00:34
@Author  :   fengzhilaoling 
@Version :   1.0
@Contact :   fengzhilaoling@163.com
'''
from flask_script import Manager
from run import app  # 导入应用
from flask_migrate import Migrate, MigrateCommand  # 导入Migrate相关模块
from exts import db  # 导入db对象
from models.models import *  # 导入要创建的表
migrate = Migrate(app, db)  # 绑定迁移的db和应用绑定
manager = Manager(app)    # 管理应用 
manager.add_command('db', MigrateCommand) # 把migratecommand命令添加到manager中,db为自定义的名称


if __name__ == '__main__':
    manager.run()